Use gcc's __asm__ version of the asm extension, which can be used in all standards

(cherry picked from commit b15d76c3379982346a87f1e908b55d150b06240f)