src: make ModifyCodeGenerationFromStrings more robust
- Fallback to true when the context is not (yet) initialized with the kAllowCodeGenerationFromStrings field.
- Fallback to true when the Environment isn't assigned to the context or when the Environment cannot call into JavaScript.
Refs: https://github.com/nodejs/node/issues/50761
I don't think this PR could actually fix the referenced issue but the guards should've been added anyway.