Quick changes to support i386 and /usr/local

Hi there,

Thanks for this. In case you are interested some quick changes to support different architecture (i386) and /usr/local/