Role of the nitrogen atom in double photoionization of monocyclic hydrocarbons