check process.platform before defining casper path