BUG: fix restrict check

If the compiler does not support the keyword the macro must still exist.
Merge pull request #5139 from juliantaylor/restrict-fix

BUG: fix restrict check