implement conditional compilation for js