Much more elaborate polyfill and test cases for Multicore.build