Try reversing the order of the rotations.
The first rotation is rotates everything (including the axes) about the initial (global) axes, the second rotation rotates about the axes established by the first rotation.
So in your case, the second rotation is rotating about a Y axis which has itself been rotated by 45 degrees about the global X axis. If you change the order, the first rotation will rotate about the global Y axis, the second about an X axis which has itself been rotated by 45 degrees about the global Y axis.
If that isn't what you want, another option is to use rotation vectors: represent each rotation as a vector whose direction is the rotation axis and the length proportional to the rotation angle. Sum the vectors, then convert the final result to a length and a normalised vector, then pass those to glm::rotate(), e.g.
Code :
glm::vec3 x = glm::vec3(1,0,0)*glm::radians(45.0f);
glm::vec3 y = glm::vec3(0,1,0)*glm::radians(45.0f);
glm::vec3 r = x+y;
glm::mat4 m;
m = glm::rotate(m, glm::length(r), glm::normalize(r));