fixed code duplication in BEXTR implementations

git-svn-id: svn://svn.code.sf.net/p/bochs/code/trunk@12223 6c8e4198-a580-4521-a02f-c9ae86df1db9
added missing includes

git-svn-id: svn://svn.code.sf.net/p/bochs/code/trunk@12224 6c8e4198-a580-4521-a02f-c9ae86df1db9