Detect and load the correct library for the current architecture.