multilib patch now with a function from Cody P Schafer

.. supports x32 arch and PPC better.