Fix attaching function to singleton class to work on 1.9 and 1.8
Fix attaching function to singleton class to work on 1.9 and 1.8

yghannam/ffi,yghannam/ffi,mvz/ffi,ferventcoder/ffi,tduehr/ffi,yghannam/ffi,ferventcoder/ffi,tduehr/ffi,sparkchaser/ffi,majioa/ffi,sparkchaser/ffi,mvz/ffi,mvz/ffi,yghannam/ffi,tduehr/ffi,sparkchaser/ffi,ffi/ffi,ferventcoder/ffi,MikaelSmith/ffi,ffi/ffi,tduehr/ffi,MikaelSmith/ffi,ffi/ffi,mvz/ffi,sparkchaser/ffi,MikaelSmith/ffi,majioa/ffi,majioa/ffi,ferventcoder/ffi,MikaelSmith/ffi,majioa/ffi,yghannam/ffi