update to upstream and fix build up to 'missing X.h'