Fixed to select correct lib under 32bit machine.

Library path was hard coded, and this file select incorrect lib file under 32bit environment.
This commit fixed this problem, adding some codes to select corresponding library file according to the environment.