Make macro and subst use hasOwnProperty for mapping

Closes #10