Fixes for Linux

A couple of fixes to make the test bench work on both Linux and OSX