Improve Nuclear Dawn game detection.

Manually cherry-picked from 10e3815f7397 on master.
Fix typo in AMBuildScript causing warnings in debug configuration leaving some options ignored.
Improve game detection in core (bug 6020).