Check for MiKTeX and custom build files before setting engine
Merge branch 'master' into st3