adds ifdef guards for v8 version