fix bootstrap with Lmod, fix issue with module function check

this should fix both issues #909 and #910 reported by @pescobar, and probably warrants a 1.12.1 release since using EasyBuild v1.12.0 with Lmod is likely to be painful