fixed test to run on mac os x (PHP_OS is set to „Darwin“ there)

My Mac OS X tried to exec a windows cmd because PHP_OS is set to "Darwin". I have added a method to check if the system is windows and replaced the strpos-code with it.