Adds preprocessor directive to the X-Content-Security-Policy stuff

Fixes #5310