Fixes for building monolith on debian 6.