Added cast to allow for compilers that assign 'unsigned long int' to

On some machines, size_type is defined as unsigned long int, and since _tagsByEntity.size() returns a variable of type size_type, it can not be compared to e.getId thus will not compile. This pull request adds a simple cast to resolve this issue.