add some cross-platform support