Fix netbsd compilation