Add 65 bit support to the 3_5_X branch

Cherry Pick of the following PR's from master into 3_5_X
PR #6180 
PR #6342 
PR #6312 
PR #6369