Fix incorrect platform check for static