added platform specific stuff for setting libc. not sure if works