Substances extracted from a marine seaweed may protect against skin cancer caused by too much sun, new research suggests.