issue #2345: fix some coding style
fix js and linux compile error