This probably a bug of yam and the work-around is to specify each parameter separately:
./yam -M xpt2h://user.user1:pass@mining.ypool.net:10034:8080:8081:8082:8083:8084:8085:8086:8087/pts -t 16 -P pts:av=0 -P pts:m=1024
Further more, I also found when proxy is used, it must be specified as the first paramter, else it won't work.
./yam --proxy socks4a://xxx.xxx.xxx.xxx:8080 --compact-stats 1 -M xpt2h://xxxxxxxxxxxxxxxxxxxx