Compilation fixes

Small fixes for configure and build.