for the user interface. Also apply patch for static/extern mismatch from Aleksej Saushev in PR 36449, which fixes build with gcc4.