adapted for biicode, tested in VS, Mingw, Ubuntu, Mac. Added travis