fixed makefile bug for g++4.6 link problem which has --as-needed by default
fixed bug in makefile for g++4.6 in Ubuntu