Adjusted use of gsub to work better with R on armel architectures