Adapt to new flatbuffers, fix OS X build