Fix compilation on certain platforms