It is hard to say all things that you need to change without having old video card for test.
I have already see a old OpenGL32.dll for emulate old gl code but I don't find the link for test.
First of all you need to change the version in the shaders because it using #version 330
The layout location method is not present in old shader, You need to change this for sure.
Normally old shader use attribute and varying variable name.
If your shader version don't support in and out variable and if you use attribute, It can surely request some little changes in the gl buffer creation too.
You can maybe try this command glGetString(GL_SHADING_LANGUAGE_VERSION);
I think your shader version is 1.2, It can help to find all specification on internet for your shader version.
It can help to find all difference, But it's not a simple task for me because I have nothing for test.
I can try to find the old opengl emulator in the week-end to see if I can help with it.
If you find a other solution just to let's me know.
Do you have try to set my parameters with your gl version ?
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
Edited:
I have find the dll emulator for rendering old opengl in software but it don't work for me.
https://fdossena.com/?p=mesa/index.frag