Fixed the static compilation issues.