Updated to detect build type.