Fixed to select correct library under 32 bit.

Library path was hard coded and this caused a problem that incorrect library file was selected under 32 bit environment.
This commit add some codes to choose corresponding library file according to the build environment.