Detection of two-dimensional electron gases in undoped heterojunctions with magnetophotoluminescence