drop some macros and use JSAutoCompartment

Signed-off-by: Adrian Negreanu <groleo@gmail.com>