Fix platform detection