a few fixes just to link on ubuntu 13.04