Fix linux build

The cocos library uses libpthread and libGL on linux, so we need to link
with them.