nasmlib.c: fix issues with strrep utility function