build: convert predefined $PLATFORM to lower case

Here is the cherry-pick from https://github.com/joyent/libuv/commit/96a2df8