fixes for compiling the bbsimapi