#3346 make test_bn irrespective of line endings
added WIN32 compatibility