fixed errors reported by jslint
honor waitForSync parameter from arangosh, too