Photocrosslinking of poly(n-phenylmethacrylamide) and its homologues