simplify implementation of os test macros