Adding support ubuntu 12.04 and fixing build for that.