fix #24, upgrade third-party components, improve build scripts, other minor improvements
fix minor AMO warning