Fix build on some platforms