fix compilation issues on certain platforms