feature #1977: Fix core compiling problems