NMR studies of methane and hydrogen in microporous materials