Added platform detection.