Partially revert commit c96e85f3

 * This commit partially reverts commit
   c96e85f3dfe8eb4f524a59f4683197dfe9539d2e
   which introduced ABI incompatible changes.
 * These changes can be restored after 3.8.1
   is released.