Address cross-platform compatibility issues with unit tests