Fixes #100. Check for keys rather than compiler directives