reinstated inreplace "-u _PyMac_Error" flags

this will fix #26610 (and other python related issues) which failed the build with error:
   
    no such file or directory: 'Python.framework/Versions/2.7/Python'

The code is actually copied from previous version of weechat.rb (version before 0b50110)