Dipole and nondipole photoionization of molecular hydrogen