Use size_t instead of unsigned it to avoid problems on 64-bit systems...

... described here http://seagrief.co.uk/2010/02/stringnpos-integers-and-64-bit-applications/