Fixed bugs for GNU/Linux build