Mesa: Build fixes and cleanup