Fixes to support debian 7.x