Cross-section effect on mechanics of nonlocal beams