Revert "Dropping headjs in favour of requirejs"

This reverts commit c4344f39356b4b5fe500d0bb42ded884b9294d59.