move Agent platform detection to config.js