Changes to make it work on a mac with gtk