Natural frequencies of a beam with non-classical boundary conditions and concentrated masses