Fixes to enable installing BB in newest php5 version until moved to mysqli.