Some quick fixes to get BB to work with the latest PHP in Ubuntu 14.04