Added crossplatform code for perft (Belka)