Rather than try to program around deprecated features of the language, it might be a better practice to use STRICT error reporting and fix the programming that relied on the deprecated features. Testing the environment for dangerous conditions is one part of being a professional. Here is one example of how to do that.
Best to all, ~Ray