Add support for EL6 and fix export bug.