Universal behavior of two-dimensional bosonic gases at Berezinskii-Kosterlitz-Thouless transitions