Unified guard against incompatible target platforms

Closes #68 to fix platform-related test failures.